<extend name="Public:base" />
<block name="main">
	<div class="content">
		<section class="location">
			<i class="iconfont">&#xe60f</i> 位置：<a href="{:U('Index/main')}">管理首页</a> &gt; 栏目管理
		</section>
		<ul class="nav-tabs clearfix">
			<li class="active">栏目管理</li>
			<li><a href="{:U(add)}">新增栏目</a></li>
		</ul>
		<form method="post" name="list">
			<input type="hidden" name="class" id="class" value="{$Think.CONTROLLER_NAME}" />
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-hover">
				<thead>
					<tr>
						<th width="20">ID</th>
						<th>栏目名称</th>
						<th>所属模型</th>
						<th>上级栏目</th>
						<th>是否导航显示</th>
						<th>栏目状态</th>
						<th width="30">排序</th>
						<th width="150">操作</th>
					</tr>
				</thead>
				<tbody>
					<volist name="category" id="data" empty="暂时没有数据">
					<tr>
						<td>{$data.id}</td>
						<td>{$data.delimiter}<if condition="$data.parent_id neq 0">├─{$data.name}<else /><strong>{$data.name}</strong></if></td>
						<td>{:Search('Model',$data['model_id'],'name')}</td>
						<td><if condition="$data.parent_id eq 0"><font color="red">顶级栏目</font><else />{:Search('Category',$data['parent_id'],'name')}</if></td>
						<td><if condition="$data.is_show eq 1">显示<else />不显示</if></td>
						<td><if condition="$data.status eq 1">启用<else />禁用</if></td>
						<td>{$data.order_id}</td>
						<td><a href="{:U('add',array('parent_id'=>$data[id]))}">添加子栏目</a> | <a href="{:U('edit',array('id'=>$data[id]))}">编辑</a> | <a href="javascript:;" data-id="{$data[id]}" class="categoryDel">删除</a></td>
					</tr>
					</volist>
				</tbody>
			</table>
		</form>
	</div>
</block>